<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td bgcolor="#cccccc" width="200" valign="top"><!-- variable RHS Menu -->
     	<?php require('templates/menu7.php');?>
 
				</td>
<td valign="top" style="padding:30px 30px 30px 30px;">
<!--content-->



<?php
if(!isset($_REQUEST['id'])){
?>
<table border="0" width="100%" align="center">
<tr>
  <td><img src="heading/User-Data-Card-Details_03.jpg" /></td>
</tr>
<tr>
   <td>&nbsp;</td>
</tr>   
<tr>
	<td>
		<b><div id="resultshere1" class="errorText">
		<?php
	 if($_REQUEST['v']=='success')
	{
	echo 'Your Request has been submitted';
	}
	 ?>
	 <?php
	 if($_REQUEST['v']=='err')
	{
	echo 'Please Select the record';
	}
	 ?>
		</div>
		</b>
		</td>
	</tr>
<tr>
<td align="center"><?php echo GetUserDatacardDetailsGrid();?></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>


<tr>
<td>&nbsp;</td>
</tr>

</table>
<?php }
else{
$sql = mysql_query('SELECT usr.user_id,usr.user_firstname,usr.user_lastname,acc.accessories_name,acc.card_no,acc.depot_location FROM `accessories` as acc INNER JOIN `users` as usr ON acc.user_id = usr.user_id where accessories_name = "Data card" and usr.user_id="'.$_REQUEST['id'].'" ORDER BY usr.user_no Asc');

$result = mysql_fetch_row($sql);
 ?>
 <form name="frmRegistration" id="frmRegistration" method="post" action="user_datacard_details_process.php">
 <input type="hidden" name="user_id" value="<?php echo $result[0];?>" />
		  <table class="grid" border="0">
		   <tr>
			  <td colspan="3"  height="10"></td>
			  </tr>
                <tr>
                <td><b>Employee First Name</b></td>
                <td>:</td>
                <td><input type="text" name="emp_fname" id="emp_fname" value="<?php echo $result[1];?>" size="20" disabled="disabled"></td>
              </tr>
			   <tr>
                <td><b>Employee Last Name</b></td>
                <td>:</td>
                <td><input type="text" name="emp_lname" id="emp_lname" value="<?php echo $result[2];?>" size="20" disabled="disabled"></td>
              </tr>
			  <tr>
                <td><b>Accessories Name</b></td>
                <td>:</td>
                <td><input type="text" name="acc_name" id="acc_name" value="<?php echo $result[3];?>" size="20" disabled="disabled"></td>
              </tr>
			  <tr>
                <td><b>Card No</b></td>
                <td>:</td>
                <td>
                <?php $sql1 = mysql_query('SELECT datacard_name,card_no,depot_location FROM data_card where depot_location="'.$result[5].'"');?>
                <select name="card_no" id="card_no">
                <option value="<?php echo $result[4];?>" selected="selected"><?php echo $result[4];?></option> 
                
                <?php while($result1 = mysql_fetch_row($sql1))
                {
				if($result[4]!=$result1[1])
				{
				?>                
                <option value="<?php echo $result1[1]; ?>"><?php echo $result1[0].'-'.$result1[1].'-'.$result1[2]; ?></option>';
                <?php 
				} }
				?>
                </select>
                </td>
                
              </tr>
              <tr>
			  <td colspan="3"  height="20"></td>
			  </tr>
              <tr>
                <td colspan="3" align="center">
				<input type="hidden" name="PageName" value="<?php echo $_SERVER['REQUEST_URI'];?>" />
				<input type="submit" value="Submit" name="submit" onClick="return Validate_Registration('frmRegistration');"></td>
              </tr>
			  <tr>
			  <td colspan="3"  height="20"></td>
			  </tr>
            </table>
			</form> 
 
 
 
 
<?php } ?>
    <!--end content-->
    </td>
	</tr>
  </table>
  </td>
  </tr>
</table>
